(defun day-of-week (day month year)
    "Returns the day of the week as an integer. Monday is 0."
    (nth-value
     6
     (decode-universal-time
      (encode-universal-time 0 0 0 day month year 0)
      0)))

(defun sundays ()
  (let ((sum 0))
    (dotimes (year 100 sum)
      (dotimes  (month 12  sum)
	(if (= 6 (day-of-week 1 (1+ month) (+ 1901 year))) (setq sum (1+ sum)))))))
	;(format t "~D ~D ~%" (1+ month) (+ 1901 year))))))
